**cd "C:\Users\eyurdagu\Dropbox\minW_insurance\codes\outputs\store\BM_June2022_FINAL"

*import excel "C:\Users\eyurdagu\Dropbox\minW_insurance\minw_avgw_JOLE.xlsx", sheet("Calibration x") firstrow clear

import excel "minw_avgw_JOLE.xlsx", sheet("Calibration x") firstrow clear

gen occ=1
replace occ=2 if Skill>7

gen skillocc=Skill
replace skillocc=Skill-7 if occ==2

twoway (line Massdata skillocc if occ==1, lcolor(blue) sort) (line Massdata skillocc if occ==2, lcolor(red) sort) ///
(line Massmodel skillocc if occ==1, lcolor(blue) lpattern(shortdash) sort) (line Massmodel skillocc if occ==2, lpattern(dash) lcolor(red) sort), ///
ytitle("Distribution of workers", size(large)) ylabel(, nogrid) xtitle("Skill group", size(large)) xlabel(1(1)7) ///
graphregion(fcolor(white) lcolor(white)) plotregion(margin(large))  ///
legend(order(1 "Blue collars (data)" 2 "White collars (data)" 3 "Blue collars (model)" 4 "White collars (model)" ) rows(2) region(lcolor(white))) 
graph export "calibx_dist.pdf", as(pdf) replace


twoway (line Wagedata skillocc if occ==1, lcolor(blue) sort) (line Wagedata skillocc if occ==2, lcolor(red) sort) ///
(line Wagemodel skillocc if occ==1, lcolor(blue) lpattern(shortdash) sort) (line Wagemodel skillocc if occ==2, lpattern(dash) lcolor(red) sort), ///
ytitle("Avg. wage (lowest = 1)", size(large)) ylabel(, nogrid) xtitle("Skill group", size(large)) xlabel(1(1)7) ///
graphregion(fcolor(white) lcolor(white)) plotregion(margin(large))  ///
legend(order(1 "Blue collars (data)" 2 "White collars (data)" 3 "Blue collars (model)" 4 "White collars (model)" ) rows(2) region(lcolor(white))) 
graph export "calibx_wage.pdf", as(pdf) replace

**#
/*
twoway (line Bitedata skillocc if occ==1, lcolor(blue) sort) (line Bitedata skillocc if occ==2, lcolor(red) sort) ///
(line Bitemodel skillocc if occ==1, lcolor(blue) lpattern(shortdash) sort) (line Bitemodel skillocc if occ==2, lpattern(dash) lcolor(red) sort), ///
ytitle("MinW bite", size(large)) ylabel(, nogrid) xtitle("Skill group", size(large)) xlabel(1(1)7) ///
graphregion(fcolor(white) lcolor(white)) plotregion(margin(large))  ///
legend(order(1 "Blue collars (data)" 2 "White collars (data)" 3 "Blue collar (model)" 4 "White collar (model)" ) rows(2) region(lcolor(white))) 
graph export "calibx_bite.pdf", as(pdf) replace
*/

twoway (line Unempmodel skillocc if occ==1, lcolor(blue) lpattern(shortdash) sort) (line Unempmodel skillocc if occ==2, lpattern(dash) lcolor(red) sort), ///
ytitle("Unemployment rate", size(large)) ylabel(, nogrid) xtitle("Skill group", size(large)) xlabel(1(1)7) ///
graphregion(fcolor(white) lcolor(white)) plotregion(margin(large))  ///
legend(order(1  "Blue collars" 2 "White collars" ) rows(1) region(lcolor(white))) 
graph export "calibx_unemp.pdf", as(pdf) replace
